# -*- coding: utf-8 -*-
# @Time    : 2024/9/6 下午3:39
# @Author  : liujun
# @Email   : 2592730854@qq.com
# @File    : release_success_page.py
# @Software: PyCharm



from appium.webdriver.common.appiumby import AppiumBy as By


class ReleaseSuccessPage:


    #菜谱发布成功
    release_recipe_success_locator=(By.ID,"com.xiachufang:id/model_create_success_textview")

    #作品发送成功
    release_works_success_locator=(By.ID,"com.xiachufang:id/navigation_bar_title_layout")


    def __init__(self, driver):
        self.driver = driver

    def release_recipe_success_txt(self):  #返回菜谱发布成功文本
        return self.driver.find_element(*self.release_recipe_success_locator).text.strip()

    def release_works_success_txt(self):  # 返回作品发布成功文本
        return self.driver.find_element(*self.release_works_success_locator).text.strip()
